<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
require_once '../funciones.php';
$con            = con_caweb();
$transaccion    = $_POST['transaccion'];

//Contenido de los campos en la tabla temporal_aux
//entero1   ->  Cuenta
//varchar1  ->  descripcionCuenta
//decimal1  ->  Debe
//decimal2  ->  Haber

$sql = "insert into temporal_aux(transaccion,entero1,varchar1,decimal1,decimal2) values('$transaccion',";
$sql1 = $sql." '{$_POST['cuenta1']}','{$_POST['des1']}','{$_POST['debe1']}','0')";
$result = mysql_query($sql1, $con) or die("Error SQL 1".mysql_error().$sql1);

$sql = "insert into temporal_aux(transaccion,entero1,varchar1,decimal1,decimal2) values('$transaccion',";
$sql1 = $sql." '{$_POST['cuenta2']}','{$_POST['des2']}','{$_POST['debe2']}','0')";
$result = mysql_query($sql1, $con) or die("Error SQL 2".mysql_error().$sql1);

$sql = "insert into temporal_aux(transaccion,entero1,varchar1,decimal1,decimal2) values('$transaccion',";
$sql1 = $sql." '{$_POST['cuenta3']}','{$_POST['des3']}','0','{$_POST['haber3']}')";
$result = mysql_query($sql1, $con) or die("Error SQL 3".mysql_error().$sql1);

$sql = "insert into temporal_aux(transaccion,entero1,varchar1,decimal1,decimal2) values('$transaccion',";
$sql1 = $sql." '{$_POST['cuenta4']}','{$_POST['des4']}','0','{$_POST['haber4']}')";
$result = mysql_query($sql1, $con) or die("Error SQL 4".mysql_error().$sql1);

$sql = "insert into temporal_aux(transaccion,entero1,varchar1,decimal1,decimal2) values('$transaccion',";
$sql1 = $sql." '{$_POST['cuenta5']}','{$_POST['des5']}','0','{$_POST['haber5']}')";
$result = mysql_query($sql1, $con) or die("Error SQL 5".mysql_error().$sql1);

$sql = "insert into temporal_aux(transaccion,entero1,varchar1,decimal1,decimal2) values('$transaccion',";
$sql1 = $sql." '{$_POST['cuenta6']}','{$_POST['des6']}','0','{$_POST['haber6']}')";
$result = mysql_query($sql1, $con) or die("Error SQL 6".mysql_error().$sql1);

?>
